/**
 * 报表设计公司(2011)
 */
package com.reportgear.designer.action.edit;

import java.util.EventObject;

import net.abbp.report.view.GridView;

import net.abbp.swing.util.ImageUtils;
import com.reportgear.designer.action.UndoableAction;

/**
 * 单元格取消合并
 * 
 * @version 1.0 2011-3-24
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ANNCSR 2.0
 */
public class UnmergeCellAction extends UndoableAction {

    public UnmergeCellAction() {
        setName("拆散");
        setMnemonic('G');
        setSmallIcon(ImageUtils.readIcon("edit/unmerge.png"));
    }

    @Override
    public boolean executeAction(EventObject evt) {
        GridView gridView = getGridView();
        if (gridView == null) {
            return false;
        }
        gridView.unmergeCell();

        return true;
    }
}
